﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelPutOutApply.aspx.cs"
    Inherits="CardLogistics.Web.MainPage.SelectPage.SelPutOutApply" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>申领单号</title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../js/jquery.js"></script>
    <link href="../../js/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
    <script src="../../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
    <form runat="server" id="f2">
    <div class="rightinfo">
        <ul class="seachform">
            <li>
                <label>
                    申领单号</label><asp:TextBox ID="txt_AyylyNo" runat="server" CssClass="scinput" Width="100px"></asp:TextBox>
            </li>
            <li>
                <label>
                    申请日期</label><asp:TextBox ID="txt_ApplyStartData" runat="server" CssClass="Wdate"
                        onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" Width="100px"></asp:TextBox>&nbsp;至
                <asp:TextBox ID="txt_ApplyEndData" runat="server" CssClass="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                    Width="100px"></asp:TextBox>
            </li>
            <li>
                <label>
                    &nbsp;</label>
                <asp:Button ID="btn_Search" runat="server" Text="查询" CssClass="scbtn" OnClick="btn_Search_Click" /></li>
        </ul>
        <asp:Repeater ID="rptList" runat="Server">
            <HeaderTemplate>
                <table class="tablelist">
                    <thead>
                        <tr>
                            <th>
                                选择
                            </th>
                            <th>
                                申领单号
                            </th>
                            <th>
                                申领数量
                            </th>
                            <th>
                                申领日期
                            </th>
                            <th>
                                卡类型
                            </th>
                            <th>
                                需求单号
                            </th>
                            <th>
                                需求数量
                            </th>
                            <th>
                                已出库数量
                            </th>
                        </tr>
                    </thead>
                    <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td align="center" width="70px">
                        <a href="#" onclick="ReturnSelData('<%# Eval("ID")%>','<%# Eval("APPLYNO")%>','<%# Eval("ApplyTotal")%>','<%# Eval("PutOutedTotal")%>');"
                            style="color: Blue;">选择</a>
                    </td>
                    <td align="center">
                        <%# Eval("APPLYNO")%>
                    </td>
                    <td align="center">
                        <%# Eval("ApplyTotal")%>
                    </td>
                    <td align="center">
                        <%#string.Format("{0:d}", Eval("APPLYDATE"))%>
                    </td>
                    <td align="center">
                        <%# Eval("CARDTYPENAME")%>
                    </td>
                    <td align="center">
                        <%# Eval("DEMANDNO")%>
                    </td>
                    <td align="right">
                        <%# Eval("DemandTotal")%>
                    </td>
                    </td>
                    <td align="right">
                        <%# Eval("PutOutedTotal")%>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </tbody></table>
            </FooterTemplate>
        </asp:Repeater>
        <webdiyer:AspNetPager ID="AspNetPager1" CssClass="paginator" CurrentPageButtonClass="cpb"
            runat="server" Width="100%" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页"
            NextPageText="下一页" PageSize="10" PrevPageText="上一页" ShowCustomInfoSection="left"
            ShowInputBox="Never" CustomInfoTextAlign="Left" LayoutType="Table" OnPageChanged="AspNetPager1_PageChanged">
        </webdiyer:AspNetPager>
        <asp:HiddenField ID="hdfDelete" runat="server" />
        <input type="hidden" id="hdfInfoType" runat="server" />
    </div>
    <script type="text/javascript">
        $('.tablelist tbody tr:odd').addClass('odd');

        function ReturnSelData(id, PConNo, ApplyTotal, PutOutedTotal) {
            //返回：[0]申领单ID [1]申领单号
            parent.document.getElementById("hf_ApplyId").value = id; //申领单ID
            parent.document.getElementById("ApplyNo").value = PConNo; //申领单号
            if (parent.document.getElementById("hf_ApplyTotal") != undefined)
                parent.document.getElementById("hf_ApplyTotal").value = ApplyTotal; //申领数量
            if (parent.document.getElementById("hf_PutOutedTotal") != undefined)
                parent.document.getElementById("hf_PutOutedTotal").value = PutOutedTotal; //已出库数量
            if (parent.document.getElementById("btn_ApplyId") != undefined)
                parent.document.getElementById("btn_ApplyId").click();
            window.parent.$.tipsWindow.removeBox();
        }

    </script>
    </form>
</body>
</html>
